<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增球员信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-player-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">球员：</label>
                <div class="col-sm-8">
                    <input name="players" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">球员英文：</label>
                <div class="col-sm-8">
                    <input name="playerName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">生日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="born" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">身高：</label>
                <div class="col-sm-8">
                    <input name="height" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">体重：</label>
                <div class="col-sm-8">
                    <input name="weight" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">国际：</label>
                <div class="col-sm-8">
                    <input name="nationality" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">位置：</label>
                <div class="col-sm-8" th:with="type=${@dict.getType('sys_player_position')}">
                    <label th:each="dict : ${type}" class="check-box">
                        <input name="position" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" required>
                    </label>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">选秀：</label>
                <div class="col-sm-8">
                    <input name="draft" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">荣誉：</label>
                <div class="col-sm-8">
                    <input name="honor" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">球队：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <!--<input type="radio" name="teamId" value="1" required>
                        <label th:for="teamId" th:text="未知"></label>-->
                        <input name="teamId" class="form-control" type="text">
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/player"
        $("#form-player-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-player-add').serialize());
            }
        }

        $("input[name='born']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>